#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This code converts  integer number of binary number and finds how many 1 in this
binary number. 
"""
def foo(sayi):
    binarysayi='{0:08b}'.format(sayi)
    toplam = binarysayi.count('1')
    return toplam
sayi=input("Lutfen bir sayi giriniz:")
toplam = foo(sayi)
print toplam
